package gov.chinatax.ctcps.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="RES_MENU"
 *     
*/
public class ResMenu implements Serializable {

    /** identifier field */
    private String menuId;

    /** nullable persistent field */
    private String menuName;

    /** nullable persistent field */
    private String menuDesc;

    /** nullable persistent field */
    private String menuUrl;

    /** nullable persistent field */
    private String menuParentId;

    /** nullable persistent field */
    private String menuTag;

    /** nullable persistent field */
    private String menuOrder;

    /** full constructor */
    public ResMenu(String menuId, String menuName, String menuDesc, String menuUrl, String menuParentId, String menuTag, String menuOrder) {
        this.menuId = menuId;
        this.menuName = menuName;
        this.menuDesc = menuDesc;
        this.menuUrl = menuUrl;
        this.menuParentId = menuParentId;
        this.menuTag = menuTag;
        this.menuOrder = menuOrder;
    }

    /** default constructor */
    public ResMenu() {
    }

    /** minimal constructor */
    public ResMenu(String menuId) {
        this.menuId = menuId;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="MENU_ID"
     *         
     */
    public String getMenuId() {
        return this.menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    /** 
     *            @hibernate.property
     *             column="MENU_NAME"
     *             length="500"
     *         
     */
    public String getMenuName() {
        return this.menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    /** 
     *            @hibernate.property
     *             column="MENU_DESC"
     *             length="1000"
     *         
     */
    public String getMenuDesc() {
        return this.menuDesc;
    }

    public void setMenuDesc(String menuDesc) {
        this.menuDesc = menuDesc;
    }

    /** 
     *            @hibernate.property
     *             column="MENU_URL"
     *             length="500"
     *         
     */
    public String getMenuUrl() {
        return this.menuUrl;
    }

    public void setMenuUrl(String menuUrl) {
        this.menuUrl = menuUrl;
    }

    /** 
     *            @hibernate.property
     *             column="MENU_PARENT_ID"
     *             length="32"
     *         
     */
    public String getMenuParentId() {
        return this.menuParentId;
    }

    public void setMenuParentId(String menuParentId) {
        this.menuParentId = menuParentId;
    }

    /** 
     *            @hibernate.property
     *             column="MENU_TAG"
     *             length="100"
     *         
     */
    public String getMenuTag() {
        return this.menuTag;
    }

    public void setMenuTag(String menuTag) {
        this.menuTag = menuTag;
    }

    /** 
     *            @hibernate.property
     *             column="MENU_ORDER"
     *             length="10"
     *         
     */
    public String getMenuOrder() {
        return this.menuOrder;
    }

    public void setMenuOrder(String menuOrder) {
        this.menuOrder = menuOrder;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("menuId", getMenuId())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof ResMenu) ) return false;
        ResMenu castOther = (ResMenu) other;
        return new EqualsBuilder()
            .append(this.getMenuId(), castOther.getMenuId())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getMenuId())
            .toHashCode();
    }

}
